home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 41
/
Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso
/
Aminet
/
dev
/
misc
/
Progr_Langs_v6.lha
/
Progr_Langs
/
cpp_verification
/
e.cpp
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1999-01-19
|
266 b
|
21 lines
#include <iostream.h>
// Exceptions verification
void main()
{
float a = 3;
float b = 0;
float c;
try
{
if(b == 0) throw "division by zero\n";
c = a / b;
cout << c << endl;
}
catch(...)
{
cout << "Exception ocurred." << endl;
}
}